<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新闻查询列表</title>
<link href="<%=request.getContextPath()%>/css/reset.css" rel="stylesheet" type="text/css"/>
<link href="<%=request.getContextPath()%>/css/style.css" rel="stylesheet" type="text/css"/>
</head>


<body>
<form name="searchForm" method="post"  >
<table width="60%" align="center" class="bordernone">
  <tr>
    <td class="bg_blue" width="18%" align="right" >标题：</td>
    <td align="left"><input type="text" name="newsInfoTitle" value="${param.newsInfoTitle}"></td>
    <td class="bg_blue" width="18%" align="right" >关键字：</td>
    <td><input type="text" name="newsInfoKeyword" value="${param.newsInfoKeyword}"></td>
  </tr> 
    <tr>
    <td class="bg_blue" align="right" >新闻发表开始日期：</td>
    <td width="140"><input type="text" name="newsInfoStartDate" onclick="SelectDate(this,'yyyy-MM-dd')" readonly value="${param.newsInfoStartDate}"></td>
    <td class="bg_blue" align="right">新闻发表结束日期：</td>
    <td width="140"><input type="text" name="newsInfoEndDate" onclick="SelectDate(this,'yyyy-MM-dd')" readonly value="${param.newsInfoEndDate}"></td>
  </tr> 
  <tr>
    <td class="nohover" colspan="4" align="center"><input class="buttonsearch" type="submit" value="查询">&nbsp; <input class="buttonreset" type="reset" value="重置" ></td>
  </tr>
</table>
</form>

<table width="100%" border="1">
  <tr><td colspan="8" class="nohover"><input type="button" class="buttonadd" onClick="javascript:window.location.href='<%=request.getContextPath()%>/NewsInfo.do?method=toAdd'" value="添加"/></td></tr>
  <tr>
    <th width="120">标题</th>
    <th width="120">类型</th>
    <th width="120">来源部门</th>
    <th width="120">发表人</th>
    <th width="120">发布日期</th>
    <th width="60">点击次数</th>
    <th width="150">操作</th>
  </tr>
  <c:forEach items="${list}" var="prod" varStatus="lineInfo">
  <tr <c:if test="${lineInfo.count % 2 == 0}">class="blue"</c:if>>
    <td><a href="<%=request.getContextPath()%>/NewsInfo.do?method=detail&newsInfoId=${prod.newsInfoId}">${prod.newsInfoTitle}</a></td>
    <td>${prod.newsInfoType}</td>
    <td>${prod.newsInfoSourcr}</td>
    <td>${prod.persionFile.perFileName}</td>
    <td><fmt:formatDate pattern="yyyy-MM-dd" value="${prod.newsInfoDate}"/></td>
    <td>${prod.newsInfoPoint}</td>
    <td><input type="button" class="buttonmodify" onClick="javascript:window.location.href='<%=request.getContextPath()%>/NewsInfo.do?method=toUpdate&newsInfoId=${prod.newsInfoId}&page=${intPage}'" value="修改"/>
    <input type="button" class="buttondelete" onClick="javascript:if(confirm('确定删除该数据吗？'))javascript:window.location.href='<%=request.getContextPath()%>/NewsInfo.do?method=delete&newsInfoId=${prod.newsInfoId}&page=${intPage}'" value="删除"/>
    </td>
  </tr>
</c:forEach>

  <tr>
    <td class="nohover" colspan="12" align="center">&nbsp;
	<form name="pageForm" method="post" action="<%=request.getContextPath()%>/NewsInfo.do?method=list">
	<span id="p"></span>
    <input type="hidden" name="newsInfoTitle" value="${param.newsInfoTitle}"/>
    <input type="hidden" name="newsInfoKeyword" value="${param.newsInfoKeyword}"/>
    <input type="hidden" name="newsInfoStartDate" value="${param.newsInfoStartDate}"/>
    <input type="hidden" name="newsInfoEndDate" value="${param.newsInfoEndDate}"/>
    <c:out value="${foot}" escapeXml="false"/>
    </form>
    </td>
  </tr>
</table>
</body>
</html>
